<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content = "height = device-height, width = 420, user-scalable = no" /> 
	<title>WebIOPi | Example 2</title>
	<script type="text/javascript" src="../../jquery.js"></script>
	<script type="text/javascript" src="../../webiopi.js"></script>
	<link rel="stylesheet" type="text/css" href="../../webiopi.css" />
	<link rel="stylesheet" type="text/css" href="style.css" />
	<script type="text/javascript">
	$(document).ready(function() {
        var sw = webiopi().createGPIOButton(0, "SW"); // create a "SW" button for GPIO 0
        $("#content").append(sw); // append button to content div
                
        var led = webiopi().createGPIOButton(7, "LED"); // create a "SW" button for GPIO 7
        $("#content").append(led); // append button to content div

        webiopi().setDirection(0, "in"); // set GPIO 0 as input
        webiopi().setDirection(7, "out"); // set GPIO 7 as output
	});
	</script>
</head>
<body>
<div id="content"></div>
</body>
</html>
